package com.mzj.saas.jobs.bill.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mzj.saas.jobs.commons.IdEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 授权人脸信息
 * @author xiaolong
 * @createDate: 2023年6月12日 下午3:58:07
 * @version: 1.0
 *
 */
@Entity
@Table(name = "saas_smart_lock_face")
public class SmartLockFace extends IdEntity {


	//	永久标记（1：永久密码；2：临时密码）
	public static final Integer PERMANENT_FLAG_YES = 1; //永久密码
	public static final Integer PERMANENT_FLAG_NO = 2; //临时密码
	/**
	 * 用户授权id
	 */
	@Basic
	@Column(name = "lock_auth_id", nullable = true)
	private Long lockAuthId; // 用户授权id

	/**
	 * 智能锁绑定id
	 */
	@Basic
	@Column(name = "lock_id", nullable = true)
	private Long lockId; // 智能锁绑定id

	/**
	 * 厂商人脸授权id
	 */
	@Basic
	@Column(name = "return_face_id", nullable = true)
	private Long returnFaceId; // 厂商人脸授权id

	/**
	 * 密码设置方式：1永久 2时间期限
	 */
	@Basic
	@Column(name = "auth_type", nullable = true)
	private Integer authType; // 密码设置方式：1永久 2时间期限

	/**
	 * 开始时间
	 */
	@Basic
	@Column(name = "start_time", nullable = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date startTime; // 开始时间

	/**
	 * 结束时间
	 */
	@Basic
	@Column(name = "end_time", nullable = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endTime; // 结束时间

	/**
	 * 时间期限(天)
	 */
	@Basic
	@Column(name = "limit_day", nullable = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Integer limitDay; // 时间期限(天)

	/**
	 * 0待执行；1已成功；2已失败
	 */
	@Basic
	@Column(name = "status", nullable = true)
	private Integer status; // 0待执行；1已成功；2已失败

	/**
	 * 人脸照rul地址
	 */
	@Basic
	@Column(name = "face_image", nullable = true)
	private String faceImage; //人脸照rul地址

	/**
	 * 创建者
	 */
	@Basic
	@Column(name = "create_by", nullable = true)
	private String createBy; //创建者

	/**
	 * 创建时间
	 */
	@Basic
	@Column(name = "create_time", nullable = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime; // 创建时间

	/**
	 * 更新者
	 */
	@Basic
	@Column(name = "update_by", nullable = true)
	private String updateBy; // 更新者

	/**
	 * 更新时间
	 */
	@Basic
	@Column(name = "update_time", nullable = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime; // 更新时间

	/**
	 * 备注
	 */
	@Basic
	@Column(name = "remark", nullable = true)
	private String remark; // 备注

	public String getIdentification() {
		return identification;
	}

	public void setIdentification(String identification) {
		this.identification = identification;
	}

	/**
	 * 天网互联密码标识
	 */
	@Basic
	private String identification;

	/**
	 * 智能锁SN号
	 */
	@Transient
	private String sn;

	/**
	 * 天数
	 */
	@Transient
	private Integer value;

	@Transient
	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	@Transient
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public Long getLockAuthId() {
		return lockAuthId;
	}

	public void setLockAuthId(Long lockAuthId) {
		this.lockAuthId = lockAuthId;
	}

	public Long getLockId() {
		return lockId;
	}

	public void setLockId(Long lockId) {
		this.lockId = lockId;
	}

	public Long getReturnFaceId() {
		return returnFaceId;
	}

	public void setReturnFaceId(Long returnFaceId) {
		this.returnFaceId = returnFaceId;
	}

	public Integer getAuthType() {
		return authType;
	}

	public void setAuthType(Integer authType) {
		this.authType = authType;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Integer getLimitDay() {
		return limitDay;
	}

	public void setLimitDay(Integer limitDay) {
		this.limitDay = limitDay;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getFaceImage() {
		return faceImage;
	}

	public void setFaceImage(String faceImage) {
		this.faceImage = faceImage;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
